Image sensors are used to sense light at an array of different pixel positions in order to capture an image representing a scene. Some examples of types of image sensors are complementary metal-oxide-semiconductor (CMOS) image sensors and charge-coupled device (CCD) image sensors. Colour filters may be used such that the different pixels represent intensities in different colour channels. However, image sensors may have some defective pixels which do not have the normal (i.e. expected) photometric response. Defective pixels may be seen in an image as pixels which have incorrect colour, i.e. a different colour to that which a pixel would have if it was not defective.
A pixel may be defective for a number of different reasons, such as a fault with the particular pixel's sensor site or a fault with a transistor which is used to process data for the pixel. Furthermore, a fault may affect a cluster of pixels or a column of pixels.
Defective pixel fixing can be applied to image data, whereby pixel values of defective pixels are replaced with predictions of correct pixel values. A “correct” pixel value in this sense is a pixel value that the pixel would have if it was not defective.
There are two stages to methods of defective pixel fixing: (i) determine which pixels are defective, and (ii) replace the defective pixel values with predicted pixel values. Some manufacturers of image sensors will test each image sensor that is manufactured and provide a defective pixel map for each image sensor which indicates pixels which are determined to be defective in the test. When a defective pixel map is available, the pixel values of pixels indicated by the defective pixel map may be replaced by predictions of those pixel values. The predicted value of a defective pixel may be based on the pixel values surrounding the defective pixel, e.g. the prediction may be a copy of the value of a pixel which is adjacent to the defective pixel or an average of several adjacent pixel values.
Defective pixel maps can be good for determining which pixels are defective in some situations. However, some causes of defective pixels are transient, such that the defective pixels may change over time. A defective pixel map provides an indication of which pixels are defective at the time at which the image sensor is tested, but the defective pixel map is not subsequently changed. Therefore, after some time, a defective pixel map might not be completely accurate in indicating which pixels are defective.
Furthermore, some image sensor manufacturers might not provide a defective pixel map for an image sensor. Therefore, it may be useful to determine which pixels are defective without relying on a defective pixel map.